home *** CD-ROM | disk | FTP | other *** search
-
-
-
- ttttccccllllOOOObbbbjjjjSSSSrrrrvvvv((((3333TTTTccccllll)))) ttttccccllllOOOObbbbjjjjSSSSrrrrvvvv((((3333TTTTccccllll))))
-
-
-
- NNNNAAAAMMMMEEEE
- tclObjSrv - Tcl-library interface to the object server
-
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- lllliiiibbbbttttccccllllOOOObbbbjjjjSSSSrrrrvvvv....ssssoooo
-
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _l_i_b_t_c_l_O_b_j_S_r_v._s_o is a Tcl shared library with extensions for accessing the
- object server. It supports the ggggeeeetttt, sssseeeetttt, ccccrrrreeeeaaaatttteeee, rrrreeeemmmmoooovvvveeee, vvvveeeerrrriiiiffffyyyy, sssseeeeaaaarrrrcccchhhh
- and DDDDSSSSsssseeeeaaaarrrrcccchhhh operations, as well as an iiiinnnnffffoooo pseudo-op that returns
- information about the database.
-
- For each object class there is a command defined; the command name is the
- class name prefixed by a dot (.) character. The first parameter to the
- object commands is an option, one of: ggggeeeetttt, sssseeeetttt, ccccrrrreeeeaaaatttteeee, rrrreeeemmmmoooovvvveeee, vvvveeeerrrriiiiffffyyyy,
- sssseeeeaaaarrrrcccchhhh, DDDDSSSSsssseeeeaaaarrrrcccchhhh, or iiiinnnnffffoooo. For example, the following command
-
- sgitcl>.hostObject info
-
- will execute the iiiinnnnffffoooo option for the hhhhoooossssttttOOOObbbbjjjjeeeecccctttt class. The object name
- may be abbreviated to the least unambiguous string. The options are
- described in detail below.
-
-
- OOOOppppeeeennnniiiinnnngggg tttthhhheeee lllliiiibbbbrrrraaaarrrryyyy
- To open the library, execute the following command from within sgitcl:
-
- sgitcl>dlopen libtclObjSrv.so init ObjSrv_Init
-
- The target server will default to the login host. The IP address of the
- target is available in the Tcl variable "_objAddr". To change targets,
- set this variable to the IP address of the desired server. For example,
-
- sgitcl> set _objAddr 192.26.75.54
- 192.26.75.54
-
- will target object operations at the specified machine (the set command
- will print the new value of the variable). There is also a command
- called _g_e_t_h_o_s_t_b_y_n_a_m_e that will do an IP lookup on a server name; so the
- above command could be executed as:
-
- sgitcl> set _objAddr [gethostbyname alpine]
- 192.26.75.54
-
- The brackets tell Tcl to execute the contents as a separate command and
- substitute the result string for the bracketed text.
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- ttttccccllllOOOObbbbjjjjSSSSrrrrvvvv((((3333TTTTccccllll)))) ttttccccllllOOOObbbbjjjjSSSSrrrrvvvv((((3333TTTTccccllll))))
-
-
-
- CCCCoooommmmmmmmaaaannnndddd SSSSyyyynnnnttttaaaaxxxx
- sgitcl>._o_b_j_e_c_t_N_a_m_e ggggeeeetttt _o_i_d _a_t_t_r_i_b_u_t_e_s
-
- The ggggeeeetttt option retrieves attributes of an object instance, specified
- by _o_i_d. The _a_t_t_r_i_b_u_t_e_s to be retrieved are defined by a list of
- aid's; attribute names may also be used (derived attributes are
- recognized). The list must be enclosed in quotes "" or braces {} if
- it contains more than one element. The returned string will contain
- the values formatted as a list in the order specified on the
- command.
-
- EEEExxxxaaaammmmpppplllleeee:
-
- sgitcl> .hostObject get 59.201.1762020729.1 {59.201.1 owner}
- alpine rj
-
- sgitcl>._o_b_j_e_c_t_N_a_m_e sssseeeetttt _o_i_d _a_i_d-_v_a_l_u_e-_l_i_s_t
-
- The sssseeeetttt option sets the values of attributes of an object instance,
- specified by _o_i_d . The _a_i_d-_v_a_l_u_e-_l_i_s_t parameter is a list of
- aid/value pairs defining the attributes to be set. The return value
- is an empty string.
-
- EEEExxxxaaaammmmpppplllleeee:
-
- sgitcl>.hostObject set 59.201.1762020729.1 {owner Beavis}
- sgitcl>.hostObject get 59.201.1762020729.1 {owner}
- Beavis
-
- sgitcl>._o_b_j_e_c_t_N_a_m_e ccccrrrreeeeaaaatttteeee _a_i_d-_v_a_l_u_e-_l_i_s_t
-
- The ccccrrrreeeeaaaatttteeee option makes a new instance of the class. The _a_i_d-
- _v_a_l_u_e-_l_i_s_t is a list of aid/value pairs defining the attributes of
- the object; any requiredOnCreate attributes must be defined. The
- return value is the _o_i_d of the new instance.
-
- EEEExxxxaaaammmmpppplllleeee:
-
- sgitcl>set beavisOID [.peopleNISObject create \
- => {loginName beavis jobTitle "MTV flunky"}]
- sgitcl>.peopleNISObject get $beavisOID jobTitle
- MTV flunky
-
- Note the use of Tcl's sssseeeetttt command to store the returned _o_i_d in a
- variable, which can then be used to perform further operations on
- the new object.
-
- sgitcl>._o_b_j_e_c_t_N_a_m_e rrrreeeemmmmoooovvvveeee _o_i_d
-
- The rrrreeeemmmmoooovvvveeee option destroys an instance of the class, specified by
- _o_i_d. The return value is an empty string.
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- ttttccccllllOOOObbbbjjjjSSSSrrrrvvvv((((3333TTTTccccllll)))) ttttccccllllOOOObbbbjjjjSSSSrrrrvvvv((((3333TTTTccccllll))))
-
-
-
- EEEExxxxaaaammmmpppplllleeee:
-
- sgitcl>.peopleNISObject remove $beavisOID
- sgitcl>.peopleNISObject get $beavisOID loginName
- query error (1)
-
- Note that after the object is removed, an attempt to access that
- object results in LEGO error 1 (LLLLEEEEGGGGOOOO____EEEERRRRRRRR____NNNNooooSSSSuuuucccchhhhNNNNaaaammmmeeee).
-
- sgitcl>._o_b_j_e_c_t_N_a_m_e vvvveeeerrrriiiiffffyyyy
-
- Performs the vvvveeeerrrriiiiffffyyyy operation on the target server. Returns an
- empty string. In this case, the object name is not significant
- (i.e. any class may be used).
-
- EEEExxxxaaaammmmpppplllleeee:
-
- sgitcl>.host verify
-
- sgitcl>._o_b_j_e_c_t_N_a_m_e sssseeeeaaaarrrrcccchhhh _a_t_t_r-_v_a_l_u_e-_o_p-_l_i_s_t
-
- Performs a sssseeeeaaaarrrrcccchhhh on the target server. The _a_t_t_r-_v_a_l_u_e-_o_p-_l_i_s_t is a
- list of attribute/value comparisons defining the filter to be
- applied to the object database. Each comparison consists of an _a_i_d
- (or attribute name), a comparison operator, and a value. The return
- value is a list of matching _o_i_d's.
-
- EEEExxxxaaaammmmpppplllleeee:
-
- sgitcl>.host search {systemName=alpine owner = rj}
- 59.201.1762020729.1
-
- Note that spaces are optional around the operator; if the value
- string is a list, or contains embedded whitespace, it must be
- enclosed in quotes or braces, and must be preceded by a space
- (before the open quote or brace). The comparison operators are
- defined as for C/C++:
-
- = exactly equal
- != not equal
- >= greater than or equal
- <= less than or equal
- > strictly greater
- < strictly less
-
- Integer values are translated in hex if preceded by 0x, and in octal
- if a leading zero (i.e. C style translation). Boolean values may be
- specified as "true" or "false". An attribute of type legoTypeTime
- is translated using the getdate() routine. Strings with embedded
- spaces must be enclosed in quotes or braces.
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- ttttccccllllOOOObbbbjjjjSSSSrrrrvvvv((((3333TTTTccccllll)))) ttttccccllllOOOObbbbjjjjSSSSrrrrvvvv((((3333TTTTccccllll))))
-
-
-
- The "matches any" operator is not defined; simply leaving the
- attribute out of the filter will achieve the same effect.
-
- sgitcl>._o_b_j_e_c_t_N_a_m_e DDDDSSSSsssseeeeaaaarrrrcccchhhh _a_t_t_r-_v_a_l_u_e-_o_p-_l_i_s_t _i_m_p_o_r_t_a_n_t-_a_t_t_r_s [----aaaannnnyyyy]
-
- Performs a Directory Server search. The _a_t_t_r-_v_a_l_u_e-_o_p-_l_i_s_t is as
- for sssseeeeaaaarrrrcccchhhh. The _i_m_p_o_r_t_a_n_t-_a_t_t_r_s argument is a list of
- aid's/attribute names to be returned. The optional switch -aaaannnnyyyy
- indicates that any server may respond; if omitted, then the search
- is directed at the current target server. The return value is a
- list of oid/attribute-list pairs, one for each matching object
- found. After this command returns, the global variable
- "_objResponder" will contain the IP address of the server that
- responded.
-
- EEEExxxxaaaammmmpppplllleeee:
-
- sgitcl>set _objResponder
- can't read "_objResponder": no such variable
- sgitcl>.host DSsearch {systemName=alpine} {numCPUs memSize} -any
- 59.201.1762020729.1 {1 41943040}
- sgitcl>set _objResponder
- 192.26.75.11
-
- sgitcl>._o_b_j_e_c_t_N_a_m_e iiiinnnnffffoooo [_o_p_t_i_o_n [args]]
-
- Provides information about the object database. With no ooooppppttttiiiioooonnnn
- parameter, the info command will return the complete description of
- the object as it appears in the *.op file used to initialize the
- database. The other options are described below:
-
- sgitcl>._o_b_j_e_c_t_N_a_m_e iiiinnnnffffoooo aaaannnnaaaammmmeeeessss
-
- Returns a list of the attribute names defined for the object;
- derived attributes are NOT included.
-
- sgitcl>._o_b_j_e_c_t_N_a_m_e iiiinnnnffffoooo ooooiiiidddd
-
- Returns the class oid (with the system and instance fields set to
- zero).
-
- sgitcl>._o_b_j_e_c_t_N_a_m_e iiiinnnnffffoooo aaaaiiiidddd _a_t_t_r-_n_a_m_e
-
- Returns the aid of the named attribute.
-
- sgitcl>._o_b_j_e_c_t_N_a_m_e iiiinnnnffffoooo aaaattttttttrrrr _a_t_t_r-_n_a_m_e
-
- Returns the text description of an attribute as it appears in the
- *.op file.
-
-
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-
-
-
- ttttccccllllOOOObbbbjjjjSSSSrrrrvvvv((((3333TTTTccccllll)))) ttttccccllllOOOObbbbjjjjSSSSrrrrvvvv((((3333TTTTccccllll))))
-
-
-
- sgitcl>._o_b_j_e_c_t_N_a_m_e iiiinnnnffffoooo ppppaaaarrrreeeennnntttt
-
- Returns the name of the base class. For the bbbbaaaasssseeeeOOOObbbbjjjjeeeecccctttt class, the
- returned value is an empty string.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- Tcl(3Tcl)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 5555
-
-
-
-